<!DOCTYPE html>
<html lang="en">
	<head>
		<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
		<meta charset="utf-8" />
		<title>用户登录</title>

		<meta name="description" content="User login page" />
		<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0" />
		<link rel="stylesheet" href="__PUBLIC__/assets/css/bootstrap.css" />
		<link rel="stylesheet" href="__PUBLIC__/assets/css/font-awesome.css" />
		<link rel="stylesheet" href="__PUBLIC__/assets/css/ace-fonts.css" />
		<link rel="stylesheet" href="__PUBLIC__/assets/css/ace.css" />
		<link rel="stylesheet" href="__PUBLIC__/assets/css/ace-rtl.css" />
		<script src="__PUBLIC__/assets/js/jquery.min.js"></script>
		<script src="__PUBLIC__/assets/js/jquery.form.js"></script>
		<script src="__PUBLIC__/layer/layer.js"></script>
<script>



//注册AJAX方法
$(function(){
	$('#checkpwd').ajaxForm({
		beforeSubmit: checkForm, // 此方法主要是提交前执行的方法，根据需要设置
		success: complete, // 这是提交后的方法
		dataType: 'json'
	});
	
	function checkForm(){

		if( '' == $.trim($('#admin_pwd').val())){
			layer.alert('密码不能为空', {icon: 6},function(index){
			layer.close(index);
			$('#admin_pwd').focus(); 
			});
			return false;
		}
 
		if( '' == $.trim($('#admin_newpwd').val())){
			layer.alert('确认密码不能为空', {icon: 6},function(index){
			layer.close(index);
			$('#admin_newpwd').focus(); 
			});
			return false;
		}
 
		if( $.trim($('#admin_pwd').val()) != $.trim($('#admin_newpwd').val())){
			layer.alert('2次密码输入不同，请重新输入', {icon: 6},function(index){
			layer.close(index);
			$('#admin_newpwd').focus(); 
			});
			return false;
		}

 }
	function complete(data){
		if(data.status==1){
			layer.alert(data.info, {icon: 6}, function(index){
 			layer.close(index);
			window.location.href=data.url;
			});
		}else{
			layer.alert(data.info, {icon: 5});
			return false;	
		}
	}
 
});
</script>
<style>
.high{ color:#F00;}
.loginnone{display:none;}
</style>
	</head>

	<body class="login-layout light-login">
		<div class="main-container">
			<div class="main-content">
				<div class="row">
					<div class="col-sm-10 col-sm-offset-1">
						<div class="login-container">
							<div class="center">
								<h1>
									<i class="ace-icon fa fa-leaf green"></i>
									<span class="red">SL</span>
									<span  class="blue" style="font-family:microsoft yahei" id="id-text2">网站后台管理</span>
								</h1>
							</div>

							<div class="space-6"></div>

							<div  class="position-relative">
							  <!-- /.login-box -->
							  <!-- /.forgot-box -->
								<div id="signup-box"  class="login-box visible widget-box no-border">
									<div class="widget-body">
										<div class="widget-main">
											<h4 class="header green lighter bigger">
												<i class="ace-icon fa fa-users blue"></i>
												重置密码
											</h4>

											<div class="space-6"></div>
											<form  name="checkpwd" id="checkpwd" method="post" action="{:U('runcheckpwd')}">
											<input type="hidden" class="form-control" name="admin_mdemail" id="admin_mdemail" value="{$admin_mdemail}" />
												<fieldset>

													<label class="block clearfix">
														<span class="block input-icon input-icon-right">
															<input type="password" class="form-control"  name="admin_pwd"  id="admin_pwd"  placeholder="填写新密码" />
															<i class="ace-icon fa fa-lock"></i>
														</span>
													</label>

													<label class="block clearfix">
														<span class="block input-icon input-icon-right">
															<input type="password" class="form-control"  name="admin_newpwd"  id="admin_newpwd"  placeholder="确认新密码" />
															<i class="ace-icon fa fa-retweet"></i>
														</span>
													</label>

													<div class="space-24"></div>

													<div class="clearfix">
														<button type="reset" class="width-30 pull-left btn btn-sm">
															<i class="ace-icon fa fa-refresh"></i>
															<span class="bigger-110">重置</span>
														</button>

														<input type="submit" class="width-65 pull-right btn btn-sm btn-success" value="确认修改密码">

													</div>
												</fieldset>
											</form>
										</div>

									</div><!-- /.widget-body -->
							  </div><!-- /.signup-box -->
						  </div><!-- /.position-relative -->

						</div>
					</div><!-- /.col -->
				</div><!-- /.row -->
			</div><!-- /.main-content -->
		</div><!-- /.main-container -->

		<!-- basic scripts -->

		<!--[if !IE]> -->
		<script type="text/javascript">
			window.jQuery || document.write("<script src='__PUBLIC__/assets/js/jquery.js'>"+"<"+"/script>");
		</script>
        
	</body>
</html>
